1. Field of the Invention
The present invention relates generally to congestion control during data transfer and, more particularly, to systems and methods for selectively performing explicit congestion notification.
2. Description of Related Art
Conventional network devices, such as routers, relay streams of data through a network from a source to a destination. Typically, the network devices include one or more memory subsystems to temporarily buffer data while the network devices perform network-related functions, such as route processing or accounting.
FIG. 1 is an exemplary diagram of a network 100 of routers partaking in a communication between a source and a destination. Suppose that a router (e.g., router 1) sends packets of data to another router (e.g., router N) via a path that includes a number of other routers (e.g., router 2, router 3, . . . , router N−2, and router N−1). When destination router N receives a packet from source router 1, router N acknowledges the packet by sending an acknowledgement message back to source router 1. The acknowledgement message may go back to router 1 directly or through other routers.
Whenever a router (e.g., router N−1) detects congestion in network 100, router N−1 drops packets according to one conventional technique for alleviating congestion. When this happens, source router 1 may not become aware of the congestion until it fails to receive the acknowledgement message from destination router N. Router 1 maintains a timer that tracks the period during which it should receive an acknowledgement message from router N. When the timer expires without receipt of an acknowledgement message, router 1 determines that congestion exists along the path and slows further packet transmissions on the path.
A problem with this conventional technique is that network resources are wasted when packets are dropped. For example, the packet travels a portion of the way to its destination using network resources before it is dropped. This is especially troublesome when the packet makes it most of the way to destination router N.
A further problem with this technique is that once notified that a packet has been dropped, source router 1 must resend the packet. The reseeding of the packet uses additional network resources without the guarantee that the packet will make it to destination router N this time.
Another technique for alleviating congestion uses explicit congestion notification (ECN). ECN involves the use of a tag in packets to explicitly inform the sender of congestion. In particular, each of the packets sent from a source (e.g., router 1) to a destination (e.g., router N) includes a tag that includes 8 bits. FIG. 2 is an exemplary diagram of a tag. The tag includes a differentiation of service (diffserv) field, an ECN capable (ECT) field, and a congestion experienced (CE) field. The diffserv field is used for assuring quality of service (QoS). The ECT field indicates whether the router (e.g., source router 1) is capable of handling ECN. The CE field indicates whether a router (e.g., router N−2) is experiencing congestion. The ECT and CE fields (bits) may not have fixed field locations. If only one of the two bits is set, it is assumed to be ECT. If both bits are set, it is assumed that both ECT and CE are set.
Suppose that a router (e.g., router 3) receives a packet sent from source router 1 to destination router N. Suppose further that router 3 is experiencing congestion. When the packet arrives, router 3 determines whether source router 1 has indicated that it is capable of handling ECN by checking the two bit fields reserved for ECT and CE in the tag. If so, router 3 may set the CE bit to indicate that congestion exists. Unlike other conventional techniques, router 3 does not drop the packet, but sends it along its path to destination router N.
When destination router N receives the packet, router N knows that there is congestion in the network based on the CE bit. Router N then sends an acknowledgement message that includes the CE information to source router 1. In response to the congestion, router 1 slows down its transmission of packets to destination router N. This improves the network utilization because packets did not get dropped. Also, the congestion notification gets to the sender (e.g., source router 1) quicker because the sender did not need to wait for a timeout to determine that there is congestion.
A problem occurs when the sender purposefully attempts to disrupt the network, such as by performing a denial of service (DoS) attack. If an attacking router (e.g., router 1) sets the ECT field to indicate that it is capable of handling ECN, then no matter what happens to the packet during its transmission along the path from router 2 to router N, no router along that path will drop the packet. Therefore, source router 1 may bombard destination router N with packets, thereby flooding the network.
As a result, there is a need for congestion alleviation techniques that also preclude attacks to the network.